I used the hook mode distributed with jedit to test the mode¡handling code in the editor as I wrote it. I include it in the distribution because it has code (mostly commented out) that exercises a lot of the customisability supported by jedit's mode mechanism, so it may be useful as an example, or as a starting point for writing your own modes. The file that creates it is normally installed in /usr/local/lib/jstools/jeditmodes/jhook-mode.tcl.